import request from '@/utils/request'

/*******企业客户*******/
export  const  submitEnt = (url,form)=>
	request({
		url,
		method:'post',
		data:JSON.stringify(form)
	})
// 获取企业列表
export  const  customerList = (search)=>
	request({
		url:'/op/ent/get_ent_list',
		method:'get',
		params:search
	})
export  const  entList = (search)=>
	request({
		url:'/op/ent/get_ent_list',
		method:'get',
		params:search
	})

//获取指定的企业客户
export  const  DetailEnt = (code)=>
	request({
		url:'/op/ent/get_ent',
		method:'get',
		params:{code}
	})
export  const  delEntCustomer = (code)=>
	request({
		url:'/op/ent/delete_ent',
		method:'get',
		params:{code}
	})
export  const  delEnt = (code)=>
	request({
		url:'/op/ent/delete_ent',
		method:'get',
		params:{code}
	})
/*******联系人*******/
export  const  ContactList = (search )=>
	request({
		url:'/op/client_history/get_client_history_list',
		method:'get',
		params:{
			entCode:search.entCode,
			pageNo:search.pageNo,
			pageSize:search.pageSize,

			keyWord:search.keyWord,
          	supOrBuyer:search.supOrBuyer,
          	supOrBuyer:search.supOrBuyer,
          	userCode:search.userCode,
          	startDate:search.startDate,
          	endDate:search.endDate,

		}
	})
	
export  const  submitContact = (url, form)=>
	request({
		url,
		method:'post',
		data:JSON.stringify(form)
	})
	
export  const  contactDetail = (code)=>
	request({
		url:'/op/client_history/get_client_history',
		method:'get',
		params:{
			code
		}
	})
	
export  const  delContact = (code)=>
	request({
		url:'/op/client_history/delete_client_history',
		method:'get',
		params:{
			code
		}
	})
 
// 获取银行账户列表 
export  const  getEntBank = (entCode)=>
	request({
		url:'/op/bank_account/get_bank_account_list',
		method:'get',
		params:{
			pageNo:1,
			pageSize:100,
			entCode
		}
	})